1. Technology Field
The present invention relates to a method of recording mapping information for a rewritable non-volatile memory, a memory controller using the same, and a memory storage apparatus using the same.
2. Description of Related Art
Digital cameras, mobile phones, and MP3 players have undergone rapid growth in recent years, so that consumers' demands for storage media have also increased drastically. Since a rewritable non-volatile memory has the characteristics of data non-volatility, low power consumption, small volume, non-mechanical structure, and fast reading and writing speed, the rewritable non-volatile memory is one of the most adaptable memories to be applied in a portable electronic product, e.g., a notebook computer. A solid state drive (SSD) is a storage apparatus which utilizes a flash memory as its storage medium. Therefore, the flash memory industry has become a very popular part of the electronic industry in recent years.
In general, a flash memory module of a flash memory storage apparatus is divided into a plurality of physical blocks, and each physical block is further divided into a plurality of physical pages. In the flash memory, each physical block is an erasing unit, and each physical page is a writing unit. When the memory cells of the flash memory are programmed, the programming may only be performed in a one-way manner (i.e., the value of each memory cell is programmed from ‘1’ to ‘0’); therefore, a direct data-writing operation cannot be performed on the programmed physical page (i.e., the physical page where old data are stored) until the physical page is erased for re-programming. In particular, the physical block is used as a unit for erasing data in the flash memory, and thus when an erasing operation is performed on a physical page where old data are stored, the entire physical block which contains the physical pages must be erased. Accordingly, the physical blocks of the flash memory module are grouped into a data area and a spare area. The physical blocks in the data area are physical blocks which have been used for storing data, while the physical blocks in the spare area are physical blocks which have not been used for storing data. When a host system is about to store data in the flash memory storage apparatus, a control circuit of the flash memory storage apparatus selects a physical block from the spare area to write data and associates the selected physical block with the data area. In addition, after the physical blocks in the data area are erased, the erased physical blocks are associated with the spare area.
In the host system, the writing operation is performed through logical addresses; therefore, during the operation of the flash memory storage apparatus, the control circuit serves to store mapping relations between the logical addresses and the physical pages in a random access memory (RAM) that is configured to temporarily store data, so as to access the data in an effortless manner. However, the RAM in the flash memory storage system has limited storage capacity; and thus how to effectively record the mapping relations between the logical addresses and the physical pages for accelerating the speed of data access has become one of the major subjects in the industry.
Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.